package com.example.springbootsecuritydemo.demos.entity;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Collection;

/**
 * @ClassName: MyUserDetail
 * @Description:
 * @Date 2024/05/15 09:38
 * @Author songshaoqiu
 **/
@Data
@Deprecated
public class MyUserDetail implements Serializable {
    private Collection<? extends GrantedAuthority> getAuthorities;

    /**
     * Returns the password used to authenticate the user.
     * @return the password
     */
    private String getPassword;

    /**
     * Returns the username used to authenticate the user. Cannot return
     * <code>null</code>.
     * @return the username (never <code>null</code>)
     */
    private String getUsername;

    /**
     * Indicates whether the user's account has expired. An expired account cannot be
     * authenticated.
     * @return <code>true</code> if the user's account is valid (ie non-expired),
     * <code>false</code> if no longer valid (ie expired)
     */
   private  boolean isAccountNonExpired;

    /**
     * Indicates whether the user is locked or unlocked. A locked user cannot be
     * authenticated.
     * @return <code>true</code> if the user is not locked, <code>false</code> otherwise
     */
    private boolean isAccountNonLocked;

    /**
     * Indicates whether the user's credentials (password) has expired. Expired
     * credentials prevent authentication.
     * @return <code>true</code> if the user's credentials are valid (ie non-expired),
     * <code>false</code> if no longer valid (ie expired)
     */
    private boolean isCredentialsNonExpired;

    /**
     * Indicates whether the user is enabled or disabled. A disabled user cannot be
     * authenticated.
     * @return <code>true</code> if the user is enabled, <code>false</code> otherwise
     */
    private boolean isEnabled;

}
